﻿using MyWeb.Model.Models;
using MyWeb.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MyWeb.Common.Helper;
using MyWeb.Business.Base;
using MyWeb.Model.User;
using MyWeb.Model.Dto;

namespace MyWeb.Business.System
{
    public interface IDepartmentService:IBaseBusiness<Department>
    {
        /// <summary>
        /// 分页查询部门列表
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        Task<PageModel<DepartmentDto>> GetDepartment(DepartmentDto dto);
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="department">用户信息</param>
        /// <returns></returns>
        Task<bool> EditInfo(DepartmentDto department);

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="department"></param>
        /// <returns></returns>
        Task<bool> AddInfo(Department department);

        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="uid">用户Id</param>
        Task<object> Remove(long uid);
        /// <summary>
        /// 获取部门数
        /// </summary>
        /// <param name="pid"></param>
        /// <returns></returns>
        Task<DepartmentTree> GetDepartmentTree(long pid = 0);
    }
}
